package com.cictec.middleware.tde.rm.disp.receiver.handler;

import org.apache.mina.core.session.IoSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.cictec.middleware.tde.rm.disp.annotation.HandleMessages;
import com.cictec.middleware.tde.rm.disp.receiver.AbstractReceiverHandler;
import com.cictec.middleware.tde.rm.protocol.TerminalMessage;
import com.cictec.middleware.tde.rm.protocol.rm.message.Rm0x06TerminalMessage;

/**
 * 设备指令应答，接收指令应答确认
 * @author Administrator
 *
 */
@Component
@HandleMessages(0x06)
public class TerminalGeneralResponseHandler extends AbstractReceiverHandler {

	private static Logger logger = LoggerFactory.getLogger(TerminalGeneralResponseHandler.class);

	@Override
	public void handleMessage(TerminalMessage msg, IoSession session) {

		Rm0x06TerminalMessage tgr = (Rm0x06TerminalMessage) msg;
		
		logger.debug("【0x06设备指令应答】终端 {} Session {}  {}", msg.getTerminalId(), msg.getSessionId(), tgr.toString());
		
	}

}
